package com.acctrue.zentao.dto;

import com.acctrue.zentao.enums.ModuleTypeEnum;

import java.util.List;

/**
 * @author : sunjj
 * @createTime : 2023/8/21
 */
public class TaskDTO {
    private TaskDTO.Input input;

    private List<TaskDTO.Output> output;

    public TaskDTO.Input getInput() {
        return input;
    }

    public void setInput(TaskDTO.Input input) {
        this.input = input;
    }

    public List<TaskDTO.Output> getOutput() {
        return output;
    }

    public void setOutput(List<TaskDTO.Output> output) {
        this.output = output;
    }

    public static class Input extends BaseInputDTO{
        /**
         * 项目id
         */
        private String projectId;

        /**
         * feat：devel refactor：devnew
         */
        private List<String> taskTypes;

        /**
         * 任务状态 任务只筛选《未开始》《进行中》《已暂停》《已完成》
         */
        private List<String> taskStatus;

        /**
         * 是否获取bug
         */
        private Boolean areBug;

        public String getProjectId() {
            return projectId;
        }

        public void setProjectId(String projectId) {
            this.projectId = projectId;
        }

        public List<String> getTaskTypes() {
            return taskTypes;
        }

        public void setTaskTypes(List<String> taskTypes) {
            this.taskTypes = taskTypes;
        }

        public List<String> getTaskStatus() {
            return taskStatus;
        }

        public void setTaskStatus(List<String> taskStatus) {
            this.taskStatus = taskStatus;
        }

        public Boolean getAreBug() {
            return areBug;
        }

        public void setAreBug(Boolean areBug) {
            this.areBug = areBug;
        }
    }

    public static class Output{
        /**
         * bug/task Id
         */
        private String id;

        /**
         * 项目id
         */
        private String projectId;

        /**
         * bug/task 标题
         */
        private String title;

        /**
         * bug/task类型
         */
        private String type;

        /**
         * bug/task状态
         */
        private String status;

        /**
         * 创建人
         */
        private String openedBy;
        /**
         * 创建时间
         */
        private String openedDate;
        /**
         * 截止时间
         */
        private String deadline;

        /**
         * 模块类型 1：bug 2：任务 3：doc 0：默认
         */
        private ModuleTypeEnum moduleType;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getProjectId() {
            return projectId;
        }

        public void setProjectId(String projectId) {
            this.projectId = projectId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getOpenedBy() {
            return openedBy;
        }

        public void setOpenedBy(String openedBy) {
            this.openedBy = openedBy;
        }

        public String getOpenedDate() {
            return openedDate;
        }

        public void setOpenedDate(String openedDate) {
            this.openedDate = openedDate;
        }

        public ModuleTypeEnum getModuleType() {
            return moduleType;
        }

        public void setModuleType(ModuleTypeEnum moduleType) {
            this.moduleType = moduleType;
        }

        public String getDeadline() {
            return deadline;
        }

        public void setDeadline(String deadline) {
            this.deadline = deadline;
        }

        @Override
        public String toString() {
            return "Output{" +
                    "id='" + id + '\'' +
                    ", projectId='" + projectId + '\'' +
                    ", title='" + title + '\'' +
                    ", type='" + type + '\'' +
                    ", status='" + status + '\'' +
                    ", openedBy='" + openedBy + '\'' +
                    ", openedDate='" + openedDate + '\'' +
                    '}';
        }
    }
}
